home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
qlib205.zip
/
QLIB.ZIP
/
TEST
/
FILE.ASM
< prev
next >
Wrap
Assembly Source File
|
1997-05-27
|
528b
|
30 lines
include qlib.inc
include dos.inc
include string.inc
include stdio.inc
include process.inc
.data
buf db 256 dup (0)
db 0
h dw ?
siz dd ?
.code
main proc
callp print,"Test file IO...\n Dump 1st 256 bytes of file.asm:\n"
callp open,"file.asm",0
mov h,ax
.if eax==ERROR
callp printf,"Failed open\n"
call abort
.endif
callp filelength,h
mov siz,eax
callp read,h,offset buf,256
callp close,h
callp printf,offset buf
callp printf,"\n Size=%d",siz
ret
main endp
end